package cn.edu.ctbu.simplescoremanagementsystem.service.impl;

import cn.edu.ctbu.simplescoremanagementsystem.domain.CourseScore;
import cn.edu.ctbu.simplescoremanagementsystem.repository.CourseScoreRepository;
import cn.edu.ctbu.simplescoremanagementsystem.service.CourseScoreService;
import cn.edu.ctbu.simplescoremanagementsystem.service.CourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Example;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CourseScoreImpl implements CourseScoreService {
    @Autowired
    public CourseScoreRepository courseScoreRepository;

    public List<CourseScore> findAll() {
        return courseScoreRepository.findAll();
    }

    public Page<CourseScore> getByPage(Pageable pageable){
        return courseScoreRepository.findAll(pageable);
    }

    public Page<CourseScore> getByPage(Example<CourseScore> courseScoreExample,Pageable pageable){
        return courseScoreRepository.findAll(courseScoreExample,pageable);
    }


}
